<template>
	<view class="my-search-container" :style="{ 'background-color': bgcolor }">
		<view class="my-search-box" :style="{ 'border-radius': radius + 'px' }" @click="searchHandler">
			<uni-icons type="search" size="20"></uni-icons>
			<text class="placeholder">{{ placeholder }}</text>
		</view>
	</view>
</template>
<script>
	export default {
		name:"my-search",
		props : {
			bgcolor: {
				type: String,
				default: '#13227a'
			},
			radius:{
				type: Number,
				default: 18
			},
			placeholder: {
				type: String,
				default: '搜索'
			}
		},
		data() {
			return {
				
			};
		},
		methods: {
			searchHandler(){
				this.$emit('click')
			}
		}
	}
</script>

<style lang="scss">
.my-search-container {
	// background-color: #13227a;
	height: 50px;
	padding: 0 15px;
	display: flex;
	align-items: center;
	.my-search-box {
		background-color: #ffffff;
		height: 36px;
		// border-radius: 15px;
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: center;
		.placeholder {
			font-size: 15px;
			margin-left: 5px;
		}
	}
}
</style>